<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>学生列表</title>
    <style>
        table, tr, td, th {
            border: 1px solid black;
            border-collapse: collapse;
        }

        td {
            padding: 10px 20px;
        }
    </style>
</head>
<body>
<h1>学生列表</h1>
<a th:href="@{/student/addPage}">新增</a>
<form action="" method="get">
    <input type="text" name="name">
    <input type="text" name="school">
    <button>搜索</button>
</form>
<table>
    <thead>
    <tr>
        <th>id</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>学校</th>
        <th>删除</th>
    </tr>
    </thead>

    <tbody>
    <tr th:each="item:${list}" th:object="${item}">
        <td th:text="*{id}"></td>
        <td th:text="*{name}"></td>
        <td th:text="*{age}"></td>
        <td th:text="*{school}"></td>
        <td>
            <a th:href="@{/student/delete?id=}+${item.id}">删除</a>
            <a th:href="@{/student/updatePage?id=}+${item.id}">更新</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>